package com.ny.kind;

import java.util.Random;

public class t1 {
    public static void main(String[] args) {
        int[]numbers=new int[10];
        Random random=new Random();
        int sum =0;
        for (int i =0;i<numbers.length;i++){
            numbers[i]=random.nextInt(100)+1;
            sum+=numbers[i];
        }
        double average =(double) sum/numbers.length;
        System.out.println("随机数组：");
        for (int num:numbers){
            System.out.println(num+"");
        }
        System.out.println(average);
    }
}
